﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SalesModel
{
    [Serializable]
    public class Product
    {
        private int id_product;
        private String name;
        private String description;
        private String ean;
        private double basePrice;
        private String category;
        private String brand;
        private int stock;

        private PriceByDate dailyPrice;

        //Serialization methods

        public int Id_product
        {
            get { return id_product; }
            set { id_product = value; }
        }
        public String Name
        {
            get { return name; }
            set { name = value; }
        }
        public String Description
        {
            get { return description; }
            set { description = value; }
        }
        public String Category
        {
            get { return category; }
            set { category = value; }
        }
        public double BasePrice
        {
            get { return basePrice; }
            set { basePrice = value; }
        }
        public String Brand
        {
            get { return brand; }
            set { brand = value; }
        }
        public int Stock
        {
            get { return stock; }
            set { stock = value; }
        }
        public String Ean
        {
            get { return ean; }
            set { ean = value; }
        }

        //Normal methods
        public Product() { id_product = -1; }//Valor por default, para saber si se seteo el id o no}
        public int getId_product()
        {
            return id_product;
        }
        public void setId_product(int id_product)
        {
            this.id_product = id_product;
        }
        public String getName()
        {
            return name;
        }
        public void setName(String name)
        {
            this.name = name;
        }
        public String getDescription()
        {
            return description;
        }
        public void setDescription(String description)
        {
            this.description = description;
        }
        public String getEan()
        {
            return ean;
        }
        public void setEan(String ean)
        {
            this.ean = ean;
        }
        public double getBasePrice()
        {
            return basePrice;
        }
        public void setBasePrice(double basePrice)
        {
            this.basePrice = basePrice;
        }
        public String getCategory()
        {
            return category;
        }
        public void setCategory(String category)
        {
            this.category = category;
        }
        public String getBrand()
        {
            return brand;
        }
        public void setBrand(String brand)
        {
            this.brand = brand;
        }
        public int getStock()
        {
            return stock;
        }
        public void setStock(int stock)
        {
            this.stock = stock;
        }

        //promoPrice methods

        public PriceByDate getDailyPrice()
        {
            return this.dailyPrice;
        }
        public void setDailyPrice(PriceByDate dP)
        {
            this.dailyPrice = dP;
        }
    }
}
